<script type="text/javascript">
    layui.config({
        base: '/static/customAdmin/'
    }).extend({
        index: 'lib/index'
    }).use(['index', 'form', 'admin', 'formSelects'], async () => {
        const form = layui.form , admin = layui.admin, formSelects = layui.formSelects;
        await form.verify({
           password: [
                /^[\S]{6,16}$/
                , '密码必须6到16位，且不能出现空格'
            ]
        });

        form.on('submit(user_submit)', async (data) => {
            await admin.post(@{{ urlfor "BackendUserController.Store" }}, data.field);
        })
    });
</script>